package pl.edu.agh.gt.stock;

import pl.edu.agh.gt.data.Rate;

public class Broker {
	
	private final static float COMISSION = 0.0003f; // spread, reasonable values are 2-6 PIPS
	
	public Broker() {
	}

	public float ask (Rate rate, float baseCurrAmount) {
		return (baseCurrAmount / rate.getClose());		
	}
	
	public float bid (Rate rate, float tradingCurrAmount) {
		return  (tradingCurrAmount * rate.getClose()) * (1 - COMISSION);		
	}
	
}
